/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.risk.hid.service;

import com.hopes.bizz.risk.gis.vo.LineStatistics;
import com.hopes.bizz.risk.hid.bo.RiskHidHiddenDangerBO;
import com.hopes.bizz.risk.hid.dto.RiskHidHiddenDangerExcelDTO;
import com.hopes.bizz.risk.hid.dto.RiskHidStatisticsDTO;
import com.hopes.bizz.risk.hid.entity.RiskHidHiddenDangerEntity;
import com.hopes.bizz.risk.hid.vo.*;
import com.hopes.bizz.risk.parkgis.vo.OrgHidVO;
import com.hopes.boss.act.base.FlowService;
import com.hopes.boss.common.service.ExcelService;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 隐患信息
 *
 * @author pig
 * @date 2023-07-18 10:51:29
 */
public interface RiskHidHiddenDangerService extends ExcelService<RiskHidHiddenDangerExcelDTO, RiskHidHiddenDangerExcelVO, RiskHidHiddenDangerEntity>, FlowService<RiskHidHiddenDangerEntity> {

    // 统计安全包保责任人隐患数量
    List<Integer> getSafetyHidData(RiskHidHiddenDangerBO danger);

    // 查询最近一条来自双体系任务的隐患
    RiskHidHiddenDangerEntity getOneByRiskHid(String code);

    /**
     * 根据企业统计数量
     */
    Map<Long, Long> countGroupByCompany();

    /**
     * 根据企业、隐患等级统计
     *
     * @param startTime 开始事件
     */
    List<OrgHidVO> listGroupLevelCompany(Date startTime);

    /**
     * @Description 根据uid查询
     * @Author lyb
     * @Date 2024/2/4
     **/
    RiskHidHiddenDangerEntity getByUid(String uid);

    /**
     * @Description 隐患个数统计
     * @Author lyb
     * @Date 2024/2/22
     **/
    RiskHidCountStatistics calculateRiskHidCountStatistics(RiskHidStatisticsDTO riskHidStatisticsDTO);

    /**
     * @Description 隐患趋势统计
     * @Author lyb
     * @Date 2024/2/22
     **/
    LineStatistics calculateRiskHidTrendStatistics(RiskHidStatisticsDTO riskHidStatisticsDTO);

    /**
     * @Description 隐患排名统计
     * @Author lyb
     * @Date 2024/2/22
     **/
    RiskHidRankingStatistics calculateRiskHidRankingStatistics(RiskHidStatisticsDTO riskHidStatisticsDTO);
}
